#ifndef __BSP_USART_H
#define __BSP_USART_H

#include "gd32f4xx.h"

// usart
#define BSP_USART           USART0

// rcu
#define BSP_USART_RCU				RCU_USART0
#define BSP_USART_TX_RCU		RCU_GPIOA
#define BSP_USART_RX_RCU		RCU_GPIOA

// gpio pin
#define BSP_USART_RX_PORT   GPIOA
#define BSP_USART_RX_PIN    GPIO_PIN_10
#define BSP_USART_TX_PORT   GPIOA
#define BSP_USART_TX_PIN    GPIO_PIN_9


void usart_gpio_config(uint32_t baundval);
void usart_send_data(uint8_t data);
void usart_send_string(uint8_t *str);

#endif
